﻿// -----------------------------------------------------------------------
// <copyright file="SubscriberSyncResult.cs" company="Zen Design Corp">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Zen.BlackBerry.Subscription.Sync
{
	using System.Collections.Generic;

	/// <summary>
	/// Contains the failed results back from a subscriber status sync attempt.
	/// </summary>
	/// <remarks>
	/// If the sync was a success, the sets will be empty.
	/// </remarks>
	public class SubscriberSyncResult
	{
		private List<PPGSubscriberUpdateFailure> _ppgSubscriberUpdateFailures;
		private List<SDKSubscriberUpdateFailure> _sdkSubscriberUpdateFailures;

		/// <summary>
		/// Initializes a new instance of the <see cref="SubscriberSyncResult"/> class.
		/// </summary>
		public SubscriberSyncResult()
		{
		}

		/// <summary>
		/// Gets the failures that occurred attempting to update subscribers on
		/// the PPG end.
		/// </summary>
		/// <value>The PPG subscriber update failures.</value>
		public List<PPGSubscriberUpdateFailure> PpgSubscriberUpdateFailures
		{
			get
			{
				if (_ppgSubscriberUpdateFailures == null)
				{
					_ppgSubscriberUpdateFailures = new List<PPGSubscriberUpdateFailure>();
				}
				return _ppgSubscriberUpdateFailures;
			}
		}

		/// <summary>
		/// Gets the failures that occurred attempting to update subscribers on
		/// the SDK end.
		/// </summary>
		/// <value>The SDK subscriber update failures.</value>
		public List<SDKSubscriberUpdateFailure> SdkSubscriberUpdateFailures
		{
			get
			{
				if (_sdkSubscriberUpdateFailures == null)
				{
					_sdkSubscriberUpdateFailures = new List<SDKSubscriberUpdateFailure>();
				}
				return _sdkSubscriberUpdateFailures;
			}
		}
	}
}
